package cn.itsource.pet.domain;

import cn.itsource.basic.domain.BaseDomain;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.ArrayList;
import java.util.List;

/**
 * 实体类：
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PetType extends BaseDomain{

    private String name;
    private String description;
    /**
     * 父类型id
     */
    private Long parentId;

    private PetType parent;
    //当前对象的儿子
    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    private List<PetType> children = new ArrayList<PetType>();

}
